﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="pictureshow.ascx.cs" Inherits="pictureshow" %>
<%@ import Namespace="System.Data" %>
<%@ import Namespace="System.Data.Sql" %>
<%@ import Namespace="System.Xml" %>
<%@ import Namespace="System.Data.SqlClient" %>
<%@ import Namespace="BLL" %>

<style type="text/css">
  body {
	margin: 0;
	padding: 0;
	font-size: 11px;
	font:black;
}
img {
	margin: 0px;
	padding: 0px;
	border: none;
}
</style>
<div id="butong_net_left" style="overflow:hidden;width:660px;">
    <table cellpadding="0" cellspacing="0" border="0">
        <tr>
            <td id="butong_net_left1" >
                <table cellpadding="0" cellspacing="0" border="0" >
                    <tr>
                    <%  
                        try
                        {
                            BLL.Business.BookBLL bookbll = new BLL.Business.BookBLL();
                            DataSet ds = bookbll.SelectNewBook();                     // 获得最新产品的数据集

                            foreach (DataRow dr in ds.Tables[0].Rows)
                            {
                                String bookId;
                                String bookName;
                                String bookCover;
                                bookId = dr["Book_Idint"].ToString();
                                bookName = dr["Book_Namestr"].ToString();
                                bookCover = "BackManage/UploadPicture/" + dr["Book_Coverstr"].ToString();
                           
                            %>
                            <td  style="padding-right:5px; margin-top:0px">
                              <table>
                                <tr>
                                  <td>
                                      <a title="查看详细资料" href='productDetail.aspx?Book_Idint=<%= bookId%>'>
                                        <img  src="<%=bookCover %>"  alt="" width="150" height="150" style="border:0; margin-top:0px; " title="<%=bookName%>"/>
                                      </a>
                                  </td>
                                </tr>
                                 <tr>
                                   <td style="width:150px; height:55px; vertical-align:text-top">
                                     <a title="查看详细资料" href='productDetail.aspx?Book_Idint=<%=bookId%>'>
			                           <font color="#0033CC"> <%=bookName%></font>
			                         </a>
                                  </td>
                                </tr>
                              </table>				       
                            <%
                            }
                        }
                        catch (Exception ex)
                        {
                            Response.Write("<script>alert('"+ex.Message.ToString()+"')</script>");
                        }
                        %>
                    </tr>
                </table>
            </td>
            <td id="butong_net_left2" valign="top"></td>
        </tr>
    </table>
</div>
<script type="text/javascript">
var speed=30//速度数值越大速度越慢
butong_net_left2.innerHTML=butong_net_left1.innerHTML
function Marquee3(){
if(butong_net_left2.offsetWidth-butong_net_left.scrollLeft<=0)
butong_net_left.scrollLeft-=butong_net_left1.offsetWidth
else{
butong_net_left.scrollLeft++
}
}
var MyMar3=setInterval(Marquee3,speed)
butong_net_left.onmouseover=function() {clearInterval(MyMar3)}
butong_net_left.onmouseout=function() {MyMar3=setInterval(Marquee3,speed)}
</script>